package com.swe.chums.dao.model;

import com.swe.chums.dao.*;
import com.swe.chums.dao.factory.*;
import com.swe.chums.dao.exceptions.*;
import java.io.Serializable;
import java.util.*;

public class UserTagType implements Serializable
{
	/** 
	 * This attribute maps to the column id in the user_tag_type table.
	 */
	protected int id;

	/** 
	 * This attribute maps to the column user_id in the user_tag_type table.
	 */
	protected int userId;

	/** 
	 * This attribute maps to the column tag_id in the user_tag_type table.
	 */
	protected int tagId;

	/**
	 * Method 'UserTagType'
	 * 
	 */
        protected String tagTypeText;

        protected String userText;
        
	public UserTagType()
	{
	}

	/**
	 * Method 'getId'
	 * 
	 * @return int
	 */
	public int getId()
	{
		return id;
	}

	/**
	 * Method 'setId'
	 * 
	 * @param id
	 */
	public void setId(int id)
	{
		this.id = id;
	}

	/**
	 * Method 'getUserId'
	 * 
	 * @return int
	 */
	public int getUserId()
	{
		return userId;
	}

	/**
	 * Method 'setUserId'
	 * 
	 * @param userId
	 */
	public void setUserId(int userId)
	{
		this.userId = userId;
	}

	/**
	 * Method 'getTagId'
	 * 
	 * @return int
	 */
	public int getTagId()
	{
		return tagId;
	}

	/**
	 * Method 'setTagId'
	 * 
	 * @param tagId
	 */
	public void setTagId(int tagId)
	{
		this.tagId = tagId;
	}

	/**
	 * Method 'equals'
	 * 
	 * @param _other
	 * @return boolean
	 */
	public boolean equals(Object _other)
	{
		if (_other == null) {
			return false;
		}
		
		if (_other == this) {
			return true;
		}
		
		if (!(_other instanceof UserTagType)) {
			return false;
		}
		
		final UserTagType _cast = (UserTagType) _other;
		if (id != _cast.id) {
			return false;
		}
		
		if (userId != _cast.userId) {
			return false;
		}
		
		if (tagId != _cast.tagId) {
			return false;
		}
		
		return true;
	}

	/**
	 * Method 'hashCode'
	 * 
	 * @return int
	 */
        public void setTagTypeText(String tagTypeText) {
        this.tagTypeText = tagTypeText;
        }

        public void setUserText(String userText) {
            this.userText = userText;
        }

        public String getTagTypeText() {
            return tagTypeText;
        }

        public String getUserText() {
            return userText;
        }
	public int hashCode()
	{
		int _hashCode = 0;
		_hashCode = 29 * _hashCode + id;
		_hashCode = 29 * _hashCode + userId;
		_hashCode = 29 * _hashCode + tagId;
		return _hashCode;
	}

	/**
	 * Method 'createPk'
	 * 
	 * @return UserTagTypePk
	 */
	public UserTagTypePk createPk()
	{
		return new UserTagTypePk(id);
	}

	/**
	 * Method 'toString'
	 * 
	 * @return String
	 */
	public String toString()
	{
		StringBuffer ret = new StringBuffer();
		ret.append( "com.swe.chums.dto.UserTagType: " );
		ret.append( "id=" + id );
		ret.append( ", userId=" + userId );
		ret.append( ", tagId=" + tagId );
		return ret.toString();
	}

}
